/**
 * 
 */
package com.pocketpets.service;

import android.util.Log;
import com.pocketpets.service.attraction.JsonAttractionService;

/**
 * @author sum
 * 
 */
public class JsonServiceFactory extends ServiceFactory {

	// ================================================================
	// Fields
	// ================================================================

	static private JsonServiceFactory instance;

	// ================================================================
	// Constructors
	// ================================================================

	private JsonServiceFactory() {
	}

	protected static JsonServiceFactory getInstance() {
		if (null == instance) {
			instance = new JsonServiceFactory();
		}
		return instance;
	}

	/**
	 * (non-Javadoc)
	 * 
	 * @see com.futurecompiler.service.IServiceFactory#getService(int)
	 */
	@Override
	public IService doGetService(ServiceType serviceType) {
		IService r = null;
		switch (serviceType) {
		case T_ATTRACTION:
			r = new JsonAttractionService();
			break;
		case T_LOGIN:
			// TODO
			// r=new JsonAccountService();
			break;
		case T_DIY:
			// TODO
			break;
		case T_Group:
			break;
		default:
			throw new UnsupportedOperationException(serviceType.toString());
		}
		return r;
	}

}
